#ifndef __CONNECTOR_H__
#define __CONNECTOR_H__

#include "unp.h"

class Connector
{
public:
  Connector(const char* host, const char* port);
  
  ~Connector();

  int connect_host(int timeout);
  int bind_host();
  int accept_host();
  int accept_select_host();
  int daytime();
  int rst_test();
private:
  void create_socket();

private:
  const char* m_host;
  const char* m_port;
  int         m_sockfd;
  int         m_connfd;
  struct sockaddr_in m_addr;
  struct sockaddr_in m_cliaddr;
};

#endif
